<div id="user">
    <div class="clear"></div>
    <fieldset id="general">
        <legend class="username"><?=$this->lang->line('user_abonent');?> <b><?= $user->login ?></b> (<?= $user->RealName ?>)</legend>

        <div id="user_panel">
            <img align="left" src="<?= $url ?>img/edit.png"> <input type="checkbox" id="hideshow">  <button id="ping">Ping</button> <button id="nmap">Nmap</button>  <button id="tasks"><?=$this->lang->line('tasks');?></button> <button style="display:inline" id="sendmessage"  > <img align="left" src="<?= $url ?>img/message.png"> <?=$this->lang->line('send_message');?></button> <button id="freez"><img align="left" src="<?= $url ?>img/freez.png"> <?=$this->lang->line('freez_task');?></button> <button > <img align="left" src="<?= $url ?>img/pay.png"> <?=$this->lang->line('pay_history');?></button> <button>  <?=$this->lang->line('parser_log');?> </button>

            <form method="POST"  action="index.php?type=user&user={$user.login}">
                <input type="hidden" name="action" value="DelUser">
                <input name="delete" class="noshow" style="float:right;background:red;color:white;font-weight:bold;"  type="submit" OnClick="if(confirm('O no O_o.<?=$this->lang->line('serios');?>')){ }else {return false;}" value="<?=$this->lang->line('del_user');?>">
            </form>
        </div>
        <div class="grid_6">
            <div class="clear"></div>


            <form id="userform" method="post" action="<?= $url ?>user/name/<?= $user->login ?>">

                <fieldset>

                    <legend><b><?=$this->lang->line('general_info');?></b></legend>
                    <?php if ($tasks): ?>
                        <div class="tasks">    
                           <fieldset style="border:3px dotted red">
                                <legend><?=$this->lang->line('tasks');?> - <b>"<?= $tasks[0]['Name'] ?>"</b></legend>

                                <p>  <?= $tasks[0]['Note'] ?></p>

                        </fieldset>




                    </div>
                    <?php endif; ?>
                            <div class="status">
                        <?php if ($user->Status == 1): ?>
                                <span class="online">
                                    Online
                            <?php if ($user->AlwaysOnline == 1): ?>
                                    <img align="middle" src="<?= $url ?>img/Online.png">
                            <?php endif; ?>
                                </span>
                        <?php else: ?>
                                        <span class="offline">
                            <?php if ($user->AlwaysOnline == 1): ?>
                                            <img align="top" src="<?= $url ?>img/Online.png">
                            <?php endif; ?>Offline</span>

                        <?php if ($user->Passive == 1): ?>|
                                                <span class="Freeze">Freeze</span>
                        <?php endif; ?>
                        <?php if ($user->Down == 1): ?>|
                                                    <span class="Down">Down</span>
                        <?php endif; ?>
                        <?php endif; ?>
                                                </div>
                                                <div id="inf">
                                                    <table>
                                                        <thead>
                                                            <tr>
                                                                <th><?=$this->lang->line('n_dog');?></th><th><?=$this->lang->line('created');?></th><th><?=$this->lang->line('last_activity');?></th>
                                                            </tr>
                                                        </thead>
                                                        <tbody>
                                                            <tr>
                                                                <td>
                                                                    <div class="show">
                                            <?php if ($user->Userdata2): ?>
                                            <?= $user->Userdata2 ?>
                                            <?php else: ?><?=$this->lang->line('fucker');?><?php endif; ?>
                                                        </div>
                                                        <div class="noshow">
                                                            <input type="text" size="1" name="options[userdata2]" value="<?= $user->Userdata2 ?>">
                                                        </div>
                                                    </td>
                                                    <td><div class="show"><?= $user->Created ?></div><div class="noshow"><input id="created" name="options[created]" type="text" value="<?= $user->Created ?>"> </div></td>
                                                    <td>
                                        <?= $user->LastConnect ?>
                                                        </td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                        </div>
                                    </fieldset>


                                    <fieldset>
                                        <legend><b><?=$this->lang->line('personal_info');?></b></legend>
                                        <table class="user">
                                            <tbody>
                                                <tr>
                                                    <th><?=$this->lang->line('login');?>:</th>
                                                    <td id="login"><?= $user->login ?></td>
                                                </tr>
                                                <tr>
                                                    <th><?=$this->lang->line('password');?>:</th>
                                                    <td>
                                                        <div class="show"><?= $user->Password ?></div>
                                                        <div class="noshow"><input type="text" name="options[password]" value="<?= $user->Password ?>"></div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <th><?=$this->lang->line('name');?>:</th>
                                                    <td>
                                                        <div class="noshow"><input size="30" type="text" name="options[name]" value='<?= $user->RealName ?>'></div>
                                                        <div class="show"><?= $user->RealName ?></div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <th><?=$this->lang->line('address');?>:</th>
                                                    <td>
                                                        <div class="noshow">
                                                            <select name="StreetID">
                                            <?php foreach ($streets as $street): ?>
                                                                <option value="<?= $street['ID'] ?>" <?php if ($street['ID'] == $user->StreetID): ?>  selected  <?php endif; ?>><?= $street['Name'] ?></option>
                                            <?php endforeach; ?>
                                                                </select>
                                                                <br>
                                                                <?=$this->lang->line('build');?> <input type="text" size="2" name="Buildingn" value="<?= $user->Buildingn ?>">
                                                                <?=$this->lang->line('entrance');?> <input type="text" size="2" name="Entrance" value="<?= $user->Entrance ?>">
                                                                <?=$this->lang->line('floor');?> <input type="text" size="2" name="Floor" value="<?= $user->Floor ?>">
                                                                <?=$this->lang->line('aparth');?> <input type="text" size="2" name="Apartn" value="<?= $user->Apartn ?>">
                                                            </div>
                                                            <div class="show"">
                                         <?php if ($user->StreetName): ?><?=$this->lang->line('street_l');?> <?= $user->StreetName ?><?php endif; ?>
                                         <?php if ($user->Buildingn): ?> <?= $user->Buildingn ?><?php endif; ?>
                                         <?php if ($user->Entrance): ?>, <?=$this->lang->line('entrance_l');?> <?= $user->Entrance ?><?php endif; ?>
                                         <?php if ($user->Floor): ?>, <?=$this->lang->line('floor_l');?> <?= $user->Floor ?><?php endif; ?>
                                         <?php if ($user->Apartn): ?>, <?=$this->lang->line('aparth_l');?> <?= $user->Apartn ?><?php endif; ?>
                                                                               </div>
                                                                           </td>
                                                                       </tr>
                                                                       <tr>
                                                                           <th><?=$this->lang->line('ipaddress');?>:</th>
                                                                           <td>
                                                                               <div class="noshow"><input type="text" name="options[ip]" value="<?= $user->IP ?>"></div>
                                                                               <div class="show"><?= $user->IP ?></div>
                                                                           </td>
                                                                       </tr>
                                                                       <tr>
                                                                           <th>MAC:</th>
                                                                           <td>
                                                                               <div class="noshow"><input type="text" name="options[userdata0]" value="<?= $user->Userdata0 ?>"></div>
                                                                               <div class="show"><?= $user->Userdata0 ?></div>
                                                                           </td>
                                                                       </tr>
                                                                       <tr>
                                                                           <th><?=$this->lang->line('email');?>:</th>
                                                                           <td>
                                                                               <div class="noshow"><input type="text" name="options[email]" value="<?= $user->Email ?>"></div>
                                                                               <div class="show"><?= $user->Email ?></div>
                                                                           </td>
                                                                       </tr>
                                                                       <tr>
                                                                           <th><?=$this->lang->line('home_phone');?>:</th>
                                                                           <td>
                                                                               <div class="noshow"><input  type="text" name="options[phone]" value="<?= $user->Phone ?>"></div>
                                                                               <div class="show"><?= $user->Phone ?></div>
                                                                           </td>
                                                                       </tr>
                                                                       <tr>
                                                                           <th><?=$this->lang->line('mobile_phone');?>:</th>
                                                                           <td>
                                                                               <div class="noshow"><input type="text" name="options[userdata1]" value="<?= $user->Userdata1 ?>"></div>
                                                                               <div class="show"><?= $user->Userdata1 ?></div>
                                                                           </td>
                                                                       </tr>
                                                                       <tr>
                                                                           <th><?=$this->lang->line('note');?>:</th>
                                                                           <td>
                                                                               <div class="noshow"><textarea name="options[note]"><?= $user->Note ?></textarea></div>
                                                                               <div class="show"><?= $user->Note ?></div>
                                                                           </td>
                                                                       </tr>

                                                                   </tbody>
                                                               </table>
                                                               <input class="check" type="checkbox" <?php if ($user->Down == 1): ?>checked<?php endif; ?> name="options[down]" value="1"> <?=$this->lang->line('down');?>
                                                                   <input class="check" type="checkbox" <?php if ($user->Passive == 1): ?>checked<?php endif; ?> name="options[passive]" value="1"> <?=$this->lang->line('passive');?>
                                                                       <input class="check" type="checkbox" <?php if ($user->AlwaysOnline == 1): ?>checked<?php endif; ?> name="options[aonline]" value="1"> <?=$this->lang->line('ao');?>
                                                                           <input class="check" type="checkbox" <?php if ($user->DisabledDetailStat == 1): ?>checked<?php endif; ?> name="options[disabledetailstat]" value="1"> <?=$this->lang->line('detstat');?>
                                                                           </fieldset>
                                                                           <input type="hidden" name="action" value="SetUser">
                                                                           <input type="hidden" name="type" value="1">
                                                                           <div class="noshow">
                                                                               <input name="save" OnClick="if(!confirm('<?=$this->lang->line('serios');?>')) { return false;}" type="submit" Value="<?=$this->lang->line('save');?>">
                                                                           </div>
                                                                       </form>
                                                                   </div>
                                                                   <div class="grid_6">
                                                                       <fieldset><legend><b><?=$this->lang->line('tariff');?></b></legend>
                                                                           <div class="tariff" id="show"><?= $user->Tariff ?> - <?= $user->Fee ?><?=$this->lang->line('currency');?></div>
                                                                           <div id="noshow">
                                                                               <form method="POST" id="tariff" action="<?= $url ?>user/name/<?= $user->login ?>">

                                                                                   <select name="options[tariff]">
                                                                                       <option value=""><?=$this->lang->line('select_tariff');?></option>
                        <?php foreach ($tariffs as $tariff): ?>
                                                                                                            <option  <?php if ($tariff['name'] == $user->Tariff): ?>  selected  <?php endif; ?>><?= $tariff['name'] ?></option>
                        <?php endforeach; ?>
                                                                                                            </select>

                    <?php if ($user->TariffChange): ?><span style="background-color: yellow">/ <?=$user->TariffChange?></span>
                            <?php endif; ?>
                                                                                                                        <input type="checkbox" name="tariff_type" value="delayed"> <?=$this->lang->line('next_month');?>
                                                                                                                        <input type="hidden" name="action" value="SetUser">
                                                                                                                        <input type="submit" name="save" OnClick="if(!confirm('<?=$this->lang->line('serios');?>')) { return false;}" value="<?=$this->lang->line('change');?>">
                                                                                                                    </form>
                                                                                                                </div>
                                                                                                            </fieldset>


                                                                                                            <fieldset>

                                                                                                                <legend><b><?=$this->lang->line('balance');?></b></legend>
            <?php if ($user->Cash < 0): ?>
                                                                                                                            <span class="cash red" >
                <?= $user->Cash ?><?=$this->lang->line('currency');?>
                                                                                                                            <img src="<?= $url ?>img/evil.png">
                                                                                                                        </span>
            <?php else: ?>
                                                                                                                                <span class="cash green">
                <?= $user->Cash ?> <?=$this->lang->line('currency');?>
                                                                                                                            </span>
            <?php endif; ?>


                                                                                                                                <form method="POST" id="balance" name="addcash"	action="<?= $url ?>user/name/<?= $user->login ?>">

                                                                                                                                    <input type="text" id="balans" name="options[cash]" AUTOCOMPLETE="off" size="3"	value="<?= $user->Fee ?>">
                                                                                                                                    <select name="paytype">
                                                                                                                                        <option value=""><?=$this->lang->line('paytype');?></option>
                                                                                                                                        <option value="bank"><?=$this->lang->line('beznal');?></option>
                                                                                                                                        <option value="nal"><?=$this->lang->line('nal');?></option>
                                                                                                                                    </select>
                                                                                                                                    <input type="radio" CHECKED name="cash_type"	value="add" onClick="getElementById('balans').value='<?= $user->Fee ?>'"> <?=$this->lang->line('add');?>
                                                                                                                                    <input type="radio" name="cash_type" value="set" onClick="getElementById('balans').value='<?= $user->Cash ?>'"> <?=$this->lang->line('set');?>
                                                                                                                                    <input	type="hidden" name="action" value="SetUser">
                                                                                                                                    <input type="hidden"	name="type" value="2">
                                                                                                                                    <input type="submit" name="save" OnClick="if(!confirm('<?=$this->lang->line('serios');?>')) { return false;}" value="<?=$this->lang->line('fillup');?>">
                                                                                                                                </form>

                                                                                                                                <?=$this->lang->line('last_fillup');?>: <b><?= $user->LastCashAddTime ?></b> <?=$this->lang->line('on');?> <b><?= $user->LastCashAdd ?></b><?=$this->lang->line('currency');?>

                                                                                                                            </fieldset>
                                                                                                                            

                                                                                                                            <fieldset>

                                                                                                                                <legend><b><?=$this->lang->line('docs');?></b></legend>
                                                                                                                                <p>
                                                                                                                                    <br><br><br><br><br>yo<br><br><br><br><br>

                                                                                                                                </p>
                                                                                                                            </fieldset>








                                                                                                                        </div>
                                                                                                                    </fieldset>
                                                                                                                    <div id="pingsimple" title="Simple ping ">


                                                                                                                        <form id="pingform" action="<?= $url ?>users/ping" method="POST">

                                                                                                                            <div id="sping_r">
                                                                                                                                <b>Ping</b>
                                                                                                                                <input type="text"  name = "ping" value="-c 4 <?= $user->IP ?>"> <input type="submit"  value="<?=$this->lang->line('send');?>"> <img src="../../img/ui-anim_basic_16x16.gif">
                                                                                                                            </div>

                                                                                                                            <div id="pingresult"></div>


                                                                                                                        </form>

                                                                                                                    </div>


                                                                                                                    <div id="pingnmap" title="Network Mapper ping">


                                                                                                                        <form id="nmapform" action="<?= $url ?>users/ping" method="POST">

                                                                                                                            <div id="nmap_r">
                                                                                                                                <b>Nmap</b>
                                                                                                                                <input type="text"  name = "nmap"  value="-sP <?= $user->IP ?>"> <input type="submit"  value="<?=$this->lang->line('send');?>"> <img src="../../img/ui-anim_basic_16x16.gif">
        </div>

        <div id="nmapresult"></div>

    </form>

</div>


<div id="messagebox" title="<?=$this->lang->line('send_message');?>"></div>
<div id="freezing" title="<?=$this->lang->line('freez_task');?>"></div>
<div id="taskbox" title="<?=$this->lang->line('tasks');?>"></div>
<!-- -->

</div>





<!--






                                                                                                                                                                                                                                           <div id="freezing" {if $user.freez.status == 1}style="background-color:yellow"{/if}>
                                                                                                                                                                                                                                                <table>
                                                                                                                                                                                                                                                   <tr>
                                                                                                                                                                                                                                                       <td colspan="2" align="center">Заморожування по замовленню {if $user.freez.startdiff}(Період заморозки - <b>{$user.freez.diff}</b> днів){/if}</td>
                                                                                                                                                                                                                                                   </tr>
                                                                                                                                                                                                                                                   <tr>
                                                                                                                                                                                                                                                       <td>
                                                                                                                                                                                                                                                           Початкова дата
                                                                                                                                                                                                                                                       </td>
                                                                                                                                                                                                                                                       <td>
                                                                                                                                                                                                                                                           Кінцева дата
                                                                                                                                                                                                                                                       </td>
                                                                                                                                                                                                                                                   </tr>
                                                                                                                                                                                                                                                   <tr>
                                                                                                                                                                                                                                                       <td>
                                                                                                                                                                                                                                                           <div id="show">{$user.freez.startdiff|truncate:10:""}</div>
                                                                                                                                                                                                                                                           <div id="noshow">
                                                                                                                                                                                                                                                               <input type="text" id="from" name="from" value="{$user.freez.startdiff|truncate:10:""}"/>
                                                                                                                                                                                                                                                           </div>
                                                                                                                                                                                                                                                       </td>
                                                                                                                                                                                                                                                       <td>
                                                                                                                                                                                                                                                           <div id="show">{$user.freez.enddiff|truncate:10:""}</div>
                                                                                                                                                                                                                                                           <div id="noshow">
                                                                                                                                                                                                                                                               <input type="text" id="to" name="to"  value="{$user.freez.enddiff|truncate:10:""}"/>
                                                                                                                                                                                                                                                           </div>
                                                                                                                                                                                                                                                       </td>
                                                                                                                                                                                                                                                   </tr>
                                                                                                                                                                                                                                                   {if $user.freez.status2 == 2}
                                                                                                                                                                                                                                                   <tr>
                                                                                                                                                                                                                                                       <td colspan="2" align="center">Історія заморожування(Всього <b>{$user.freez.count}</b> раз(ів):)</td>
                                                                                                                                                                                                                                                   </tr>
                                                                                                                                                                                                                                                   {foreach from=$user.freez.unfr item=unfreez name=unfreez}
                                                                                                                                                                                                                                                   <tr>
                                                                                                                                                                                                                                                       <td>
                                                                                                                                                                                                                                                           <b>{$smarty.foreach.unfreez.iteration}.</b> {$unfreez.Date_start|truncate:10:""}
                                                                                                                                                                                                                                                       </td>
                                                                                                                                                                                                                                                       <td>{$unfreez.Date_end|truncate:10:""}</td>
                                                                                                                                                                                                                                                   </tr>
                                                                                                                                                                                                                                                   {/foreach}
                                                                                                                                                                                                                                                   {/if}
                                                                                                                                                                                                                                               </table>
                                                                                                                                                                                                                                           </div>
                                                                                                                                                                                                                                           <div id="noshow"><input type="checkbox" {if $user.Down==1}checked{/if} name="options[down]" value="1"> Відключений <input type="checkbox" {if $user.Passive==1}checked{/if} name="options[passive]" value="1"> Заморожений <input type="checkbox" {if $user.AlwaysOnline==1 }checked{/if} name="options[aonline]" value="1">
                                                                                                                                                                                                                                                                                                                                                                                                                                                                             Завжди онлайн <input type="checkbox"	{if $user.DisabledDetailStat==1}checked{/if} name="options[disabledetailstat]" value="1"> Відкл.детальну статистику</div>
                                                                                                                                                                                                                                       </fieldset>
                                                                                                                                                                                                                                       <input type="hidden" name="action" value="SetUser"> <input type="hidden" name="type" value="1">
                                                                                                                                                                                                                                       <div id="noshow">
                                                                                                                                                                                                                                           <input class="button"	OnClick="{literal}if(!confirm('{/literal}{#save#}{literal}')) { return false;}{/literal}" type="submit" Value="Зберегти">
                                                                                                                                                                                                                                       </div>





                                                                                                                                                                                                                                       </form>
                                                                                                                                                                                                                                   </td>
                                                                                                                                                                                                                                   <td valign="top">




                                                                                                                                                                                                                                       <div>





<fieldset><legend><b>Документи</b></legend>

</fieldset>


<fieldset><legend><b>Статистика</b></legend>

</fieldset>


</td>
</tr>
</tbody>
</table>



<br>
<div id="noshow">
<form method="POST" id="delete"
action="index.php?type=user&user={$user.login}"><input type="hidden"
name="action" value="DelUser"> <input class="button" type="submit"
style="float: right; text-decoration: blink; color: red; font-weight: bold"
OnClick="{literal}if(confirm('Та ну нах, може не треба? І так як кіт наплакав...')){page('','userlist') }else {return false;}{/literal}"
value="Видалити"></form>
</div>
<br>
<hr>

{/if}
-->
